<?php
class Page extends Response {
	protected $title = '';
	protected $content = '';

	public function __construct($title = '', $content = '') {
		$this->title = $title;
		$this->content = $content;
	}

	public function getTitle() {
		return $this->title;
	}

	public function setTitle($title) {
		$this->title = $title;
	}

	public function setContent($html) {
		$this->content = $html;
	}

	public function respond() {
		$r = '<!doctype html>'.PHP_EOL;
		$r .= '<html>'.PHP_EOL;
		$r .= '  <head>'.PHP_EOL;
		$r .= '    <title>'.$this->title.'</title>'.PHP_EOL;
		$r .= '  </head>'.PHP_EOL;
		$r .= '  <body>'.PHP_EOL;
		$r .= '    '.$this->content.PHP_EOL;
		$r .= '  </body>'.PHP_EOL;
		$r .= '</html>';
		return $r;
	}

}
?>